home *** CD-ROM | disk | FTP | other *** search
/ MIDICraft's MIDINET CD-ROM / MIDICraft's MIDINET CD-ROM.iso / DOSUTILS / MIDI2GM.DOC < prev    next >
Text File  |  1996-09-22  |  10KB  |  249 lines

  1.         ******************************
  2.             MIDIKORG v1.4
  3.     
  4.         midi binaries to general midi
  5.               by Guenter Nagler 
  6.                 1995 
  7.           (gnagler@ihm.tu-graz.ac.at)
  8.         ******************************
  9.  
  10. [0] FEATURES
  11.     + reads a binary midi file
  12.     + writes a binary midi file
  13.     + removes program changes and bank selections in channel 10
  14.     + shows all changes done to the file
  15.     + can map channel numbers
  16.     + initializes korg i2/i3 programs and banks to GM
  17.     + converts korg i2/i3 midi to GM (inserts reverb, chorus)
  18.  
  19. [1] BACKGROUND
  20. I am using a Korg i3 music workstation and had some problems with 
  21. some midi files. The instrument recognizes a drum at channel 10
  22. only if no program change at this channel is done or a drum channel 
  23. selection is done. First I tried to change the drum channel manually
  24. at the instrument switches. I automatized this process by playing an 
  25. initialization midi (containing only program changes and bank selections) 
  26. before playing the music file.
  27. This solution does not work if there are some bank selection or
  28. program changes inside the song part.
  29. For these cases I used my programs MIDI2TXT and TXT2MIDI to manually
  30. edit the commands that confused my machine.
  31. I found that the changes done in these files are so minimal that
  32. it could be easily done automatically. Once I found a correct karaoke
  33. midi that korg i3 could not play (some of the lyrics may have confused
  34. the instrument) so I added an option (-notext) to ignore the textual
  35. meta events.
  36. Originally I called the program MIDIKORG for exclusive use with my
  37. instrument. Later I noticed that that the program only does minor Korg
  38. dependent modifications and only if a korg dependent option is set.
  39. So I changed the name to the name MIDI2GM for general use.
  40.  
  41. [2] FILES DESCRIPTION
  42.  
  43. MIDI2GM.EXE.........converter program
  44. MIDI2GM.DOC.........this file, showing usage of MIDI2GM.EXE
  45. MIDIIO.HPP..........header file for a c++ midi parser
  46. MIDIIO.CPP..........source code for a c++ midi parser
  47. MIDI2GM.CPP.........c++ source code for modifying midi files
  48. MIDI2GM.MAK.........make file for project
  49. MIDI2GM.CFG.........compiler options for make
  50. MIDI2GM.PRJ.........compiler project for Borland (tm) c++ compilers
  51. only MIDI2GM.EXE is required to run program
  52.  
  53. [3] COPYRIGHT
  54.  
  55. MIDI2GM (c) 1995 was created by Guenter Nagler.
  56.  
  57. MIDI2GM is free and may be used as you wish with this one exception:
  58.  
  59.     You may NOT charge any fee or derive any profit for distribution
  60.     of MIDI2GM.  Thus, you may NOT sell or bundle MIDI2GM with any
  61.     product in a retail environment (shareware disk distribution, CD-ROM,
  62.     etc.) without permission of the author.
  63.  
  64. You may give MIDI2GM to your friends, upload it to a BBS, or ftp it to
  65. another internet site, as long as you don't charge anything for it.
  66.  
  67. [4] DISCLAIMER
  68.  
  69. MIDI2GM was designed to handle 100% compatible midi files.
  70. It was tested with 600 different midi files but I can not say if 
  71. each 100% midi compatible midi file can be correctly converted.
  72. So I give no guarantees of the results, especially with non 100% 
  73. compatible midi files.
  74. If you find a midi file that you think to be 100% compatible midi
  75. that is not correctly converted, please send a sample file to 
  76. gnagler@ihm.tu-graz.ac.at . 
  77.  
  78. Use MIDI2GM at your own risk.  Anything you do with MIDI2GM is your
  79. responsibility, and not the author's.  Any damage caused to any person,
  80. computer, software, hardware, company, or business by running MIDI2GM
  81. is your responsibility, and the author will not be liable.
  82.  
  83. If you don't understand these terms, or are not sure of something, or
  84. are afraid something bad might come of using MIDI2GM, don't  use  it!
  85. You are here forewarned.
  86.  
  87. [5] INSTALLATION
  88.  
  89. [MSDOS]
  90. Simply copy MIDI2GM.EXE in a directory that is in your path.
  91. When you start the program without arguments
  92.  
  93. [UNIX]
  94. compile sources with your C++ compiler (e.g. GNU Compiler g++):
  95.  
  96. g++ -o midi2gm midi2gm.cpp midiio.cpp
  97.  
  98. and run program
  99.  
  100. $ midi2gm
  101.  
  102. C:\> MIDI2GM
  103.  
  104. you should get the usage text (see next section)
  105.  
  106. [6] USAGE
  107.  
  108. usage: MIDI2GM [-i3][-q][-notext][-nosys][-nonote #[-#]][-nobend #[-#]][-mapchannel #[-#] #] midifile.mid gmfile.mid
  109.  
  110. The parts in brackets [...] are optional.
  111.  
  112. The program MIDI2GM allows following option:
  113. -version    get program version
  114. -i3     initializes all tracks with default GM-programs and
  115.     selects according banks (should only be used for Korg i2/i3)
  116. -q      be quiet,  program does not show the changes
  117.  
  118. -notext ignore all textual information (tracknames, lyrics)
  119.  
  120. -nosys  ignore all sysex events
  121.  
  122. -nonote #[-#]   ignore all note on/off events on channel # (1-16) or on 
  123.         channels between # and # (both between 1-16 and first number less or equal second number)
  124.  
  125. -nobend #[-#]   ignore all pitch bend events on channel # (1-16) or on
  126.         channels between # and # (both between 1-16 and first number less or equal second number)
  127.  
  128. -mapchannel #[-#] #  map all channel dependent commands from channels #-# to channel #
  129.         (first #-# (1-16) are source, second # (1-16) is destination)
  130.  
  131. MIDI2GM produces a copy of the input midi if no changes are necessary!
  132.  
  133. Warning:
  134.   Do not expect that MIDI2GM will produce a copy of the original
  135.   file! MIDI allows to encode its commands in different ways without 
  136.   changing the semantic of the notes (It is allowed to compress the 
  137.   midi file by ommiting redunant command bytes, but it is no duty).
  138.   MIDI2GM only compresses note on/off command bytes for higher
  139.   compatibility.
  140.       
  141. [8] SUGGESTIONS / COMMENTS / BUG REPORTS / QUESTIONS
  142.  
  143.          WWW:    http://hgiicm.tu-graz.ac.at/Cpub
  144.           contains all my dos/unix midi programs
  145.          EMAIL:  gnagler@ihm.tu-graz.ac.at
  146.  
  147. [9] USE
  148. I always use MIDI2GM in a dos batch file MIDI.BAT that produces temporary
  149. midi file that is played with my dos sound player:
  150.  
  151. midi.bat:
  152.    midi2gm -i3 %1 temp.mid
  153.    playmidi temp.mid
  154.    del temp.mid
  155.  
  156. I use this batch by entering
  157.    midi filename.mid
  158.  
  159. example: map drum channel from extended midi to general midi
  160.  
  161.    midi2gm -map 16 10 original.mid copy.mid
  162.  
  163. example: map a list of drum channels used on channels 10-16 to general midi
  164.  
  165.    midi2gm -map 10-16 10 original.mid copy.mid
  166.  
  167. example: map channels of a non-gm midi without producing a gm compatible
  168.    midi file
  169.  
  170.    midi2gm -map 5 1 -map 4 2 -map 2 4 -map 1 5 -notbank original.mid mapped.mid
  171.  
  172. example: generate a midi that you can play channel 4 by yourself with keyboard
  173.      and rest by midi ensemble.
  174.  
  175.    midi2gm -nonote 4 -notbank original.mid without4.mid
  176.  
  177. example: you own a korg i2 or i3 and created your korg song with song
  178.    internal sequencer a korg.sng, the example shows how to generate a 
  179.    gm midi (the conversion uses korg additional information found in
  180.    a parameter table).
  181.  
  182.    1. load the song korg.sng into the sequencer (e.g. song 0)
  183.       save the song 0 as format 1 midi into korg.mid on a floppy disk.
  184.    2. put the floppy disk to your computer where you have installed 
  185.       the midi2gm program.
  186.    3. enter the command
  187.       midi2gm korg.mid korggm.mid
  188.      
  189.       use option -map to map extra drum channels that are not on channel 10
  190.        to channel 10 (e.g. percussion/drums on channels 11, 12, 13) :
  191.       midi2gm -map 11 10 -map 12 10 -map 13 10    korg.mid korggm.mid
  192.  
  193. Hint: You could use midi2txt and txt2midi (available at WWW location 
  194.       in [8]) to manually add the 
  195.       song title and composer
  196.           trackname "title of the song (by composer, artist)" 
  197.       copyright of the song 
  198.       copyright "(c) year my name"
  199.         (both only in first track, that is the tempo track),
  200.       lyrics to the song
  201.       lyric "line of song text"
  202.         (can use many lyric commands, e.g. one for each phrase,
  203.          add it in first track or in the track that contains the vocal notes, 
  204.          you could add it at the place where the according notes are played 
  205.          or use a karaoke midi program to add the synchronized lyrics).
  206.       instrumentation and intention of tracks
  207.          trackname "guitar for solo in middle part"
  208.          (add it to each track that plays notes, or change already existing
  209.          trackname lines e.g. trackname "Track01").
  210.  
  211. Hint: You could use midifade (see [8]) to fade in or fade out parts of
  212.       the song.
  213.  
  214.  
  215. [10] CHANGES
  216. v1.0 to v1.1:
  217.   * added -nosys command to ignore all sysex commands
  218.   * some portability changes for UNIX compatibility
  219.  
  220. v1.1 to v1.2:
  221.   * added -nonote command to mute all notes of a certain channel
  222.   * added -mapchannel command to change channel numbers
  223.   * automatic channel mapping to GM drum channel 10 when certain
  224.     drum specific keywords (e.g. Hi-hat, drums, snare ...) are 
  225.     recognized in trackname of a track (only format 1 midi)
  226.  
  227. v1.2 to v1.3
  228.   * midiio engine writes less compressed but safer files (more compatibility
  229.     to weak midi readers)
  230.   * recognizes korg i2/i3 meta event for song parameter initialization
  231.     (for conversion between korg i2/i3 midi and GM)
  232.  
  233. v1.3 to v1.4
  234.   * program name changed from MIDIKORG to MIDI2GM
  235.   * option -notbank added so that automatic removing bank selection commands
  236.     can be suppressed (e.g. for channel mapping only).
  237.   * option -nonote allows range of midi channels e.g. -nonote 1-9 11-16
  238.   
  239. v1.4 to v1.5
  240.   * added option -version
  241.   * simplified program by using class MidiCopy for modifying midi files
  242. v1.5 to v1.6
  243.   * added initialization of i2/i3 (option) in case of 
  244.     guessing drums not on channel 10
  245.   * option -map enhanced by allowing source channel ranges
  246.     e.g. -map 11-16 10 is same as 
  247.      -map 11 10 -map 12 10 -map 13 10 -map 14 10 -map 15 10 -map 16 10 
  248.   * added options for initializing XG, GM, GS
  249.   * fixed problems with special sysex commands